<#assign ctx>${rc.contextPath}</#assign>
<script>
	//系统时间显示设置
	Date.prototype.Format = function(formatStr) {
		var str = formatStr;
		var Week = [ '日', '一', '二', '三', '四', '五', '六' ];
		str = str.replace(/yyyy|YYYY/, this.getFullYear());
		str = str.replace(/yy|YY/, (this.getYear() % 100) > 9 ? (this.getYear() % 100).toString() : '0' + (this.getYear() % 100));
		str = str.replace(/MM/, (this.getMonth() + 1) > 9 ? (this.getMonth() + 1).toString() : '0' + (this.getMonth() + 1));
		str = str.replace(/M/g, this.getMonth() + 1);
		str = str.replace(/w|W/g, Week[this.getDay()]);
		str = str.replace(/dd|DD/, this.getDate() > 9 ? this.getDate().toString() : '0' + this.getDate());
		str = str.replace(/d|D/g, this.getDate());
		str = str.replace(/hh|HH/, this.getHours() > 9 ? this.getHours().toString() : '0' + this.getHours());
		str = str.replace(/h|H/g, this.getHours());
		str = str.replace(/mm/, this.getMinutes() > 9 ? this.getMinutes().toString() : '0' + this.getMinutes());
		str = str.replace(/m/g, this.getMinutes());
		str = str.replace(/ss|SS/, this.getSeconds() > 9 ? this.getSeconds().toString() : '0' + this.getSeconds());
		str = str.replace(/s|S/g, this.getSeconds());
		return str;
	}
	var timeInterval = setInterval("clock()", 1000)
	function clock() {
		$("#nowTime").text(new Date().Format("yyyy-MM-DD hh:mm 星期w"));
	}
	$(function() {
		//home
		$("#noticeAbtn,#homeAbtn,#pwdAbtn").click(function() {
			var uri = $(this).attr("href");
			if (uri != "") {
				try {
					$.post(uri, function(result) {
						$("[oper=content]").html(result).attr("href", uri);
						$(".icon-arrow-right").remove();
					}, "html");
				} catch (e) {
					alert("error");
				}
			}
			return false;
		});
	});
</script>
<style>
<!--
#logoName {
	color: #049ad7;
	font-weight: 900;
	text-shadow: 0 2px 0 #FFFFFF;
	min-width: 330px;
}

#logoImg {
	margin: -12px 5px -6px -12px;
}

ul {
	vertical-align: middle;
	margin: auto;
}
-->
</style>
<div class="navbar">
	<div class="navbar-inner">
		<div class="container">
			<div class="nav pull-left">
				<a id="logoName" href="${ctx}/" class="brand">
					<img id="logoImg" alt="logo" src="${ctx}/resources/css/image/logo.mini.png" />
					艾唯奶粉进销存管理系统·ADMS
				</a>
			</div>
			<ul class="nav pull-left">
				<li>
					<a>
						<i class="icon-user"></i>
						${USER.department.name} 用户 ${USER.name}, 您好！
					</a>
				</li>
				<li>
					<a>
						<i class=" icon-time"></i>
						今天是
						<span id="nowTime">2012-10-10 17:38 星期六</span>
					</a>
				</li>
			</ul>
			<ul class="nav pull-right">
				<li>
					<a id="homeAbtn" href="${ctx}/frame/welcome">
						<i class="icon-home"></i>
						首页
					</a>
				</li>
				<li>
					<a id="noticeAbtn" href="${ctx}/adoms/msgNotice/myNotice">
						<i class="icon-envelope"></i>
						系统消息
					</a>
				</li>
				<li>
					<a id="pwdAbtn" href="${ctx}/security/users/passwd">
						<i class="icon-cog"></i>
						修改密码
					</a>
				</li>
				<li>
					<a href="${ctx}/j_spring_security_logout">
						<i class="icon-off"></i>
						退出系统
					</a>
				</li>
			</ul>
		</div>
	</div>
</div>
